package com.sky.service.impl;

import com.sky.entity.Address;
import com.sky.mapper.AddressMapper;
import com.sky.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    @Override
    public void save(Address address) {
        addressMapper.insert(address);
    }

    @Override
    public List<Address> listVisible() {
        return addressMapper.selectAllVisible();
    }

    @Override
    public void update(Address address) {
        addressMapper.update(address);
    }

    @Override
    public void delete(Long id) {
        addressMapper.delete(id);
    }
}
